package com.topgay.domain;

import java.io.Serializable;
import java.util.Date;

public class ChattingMessage implements Serializable{
	
	private int count;
	private String message;
	private String fromId;
	private String toId;
	private String time;
	
	public ChattingMessage() {
		super();
	}
	public ChattingMessage(int count, String message, String fromId, String toId) {
		super();
		this.count = count;
		this.message = message;
		this.fromId = fromId;
		this.toId = toId;
	}
	public ChattingMessage(int count, String message, String fromId,
			String toId, String time) {
		super();
		this.count = count;
		this.message = message;
		this.fromId = fromId;
		this.toId = toId;
		this.time = time;
	}
	public int getCount() {
		return count;
	}
	public void setCount(int count) {
		this.count = count;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public String getfromId() {
		return fromId;
	}
	public void setfromId(String fromId) {
		this.fromId = fromId;
	}
	public String gettoId() {
		return toId;
	}
	public void settoId(String toId) {
		this.toId = toId;
	}
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	@Override
	public String toString() {
		return "TestChatting [count=" + count + ", message=" + message
				+ ", fromId=" + fromId + ", toId=" + toId + ", time="
				+ time + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + count;
		result = prime * result
				+ ((toId == null) ? 0 : toId.hashCode());
		result = prime * result + ((message == null) ? 0 : message.hashCode());
		result = prime * result + ((fromId == null) ? 0 : fromId.hashCode());
		result = prime * result + ((time == null) ? 0 : time.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ChattingMessage other = (ChattingMessage) obj;
		if (count != other.count)
			return false;
		if (toId == null) {
			if (other.toId != null)
				return false;
		} else if (!toId.equals(other.toId))
			return false;
		if (message == null) {
			if (other.message != null)
				return false;
		} else if (!message.equals(other.message))
			return false;
		if (fromId == null) {
			if (other.fromId != null)
				return false;
		} else if (!fromId.equals(other.fromId))
			return false;
		if (time == null) {
			if (other.time != null)
				return false;
		} else if (!time.equals(other.time))
			return false;
		return true;
	}
	
	
	
}
